<template>
  <div class="detail">
      <van-swipe :autoplay="3000">
        <van-swipe-item v-for="(image, index) in detailData.image" :key="index">
            <img  @click="$router.push('/imageDetail')" v-lazy="image" style="width:100%;height:300px;"/>
        </van-swipe-item>
    </van-swipe>
    {{detailData.title}}
  </div>
</template>

<script>

export default {
    data() {
        return {
            detailData: {}
        }
    },
    created() {
        this.$api.getCarDetail(this.$route.params.id).then(res=>{
            if(res.success) {
                this.detailData = res.data
            }
        })
    }
}
</script>

<style>

</style>